# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=uthash
pkgver=2.1.0
_sover=0  # based on Fedora package
pkgrel=0
pkgdesc="C macros for hash tables and more"
url="http://troydhanson.github.io/uthash/"
arch="noarch"
license="BSD-2-Clause"
depends_dev="$pkgname=$pkgver-r$pkgrel"
checkdepends="perl"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/troydhanson/$pkgname/archive/v$pkgver.tar.gz"

replaces="libut" # Removed package

check() {
	make -C tests
	make -C tests/threads
}

package() {
	mkdir -p "$pkgdir"/usr/include

	install -m 0644 src/*.h "$pkgdir"/usr/include/
}

sha512sums="c8005113a48ec7636715ecec0286a5d9086971a7267947aba9e0ad031b6113a4f38a1fb512d33d6fefb5891635fdd31169ce4d6ab04b938bda612ebbccb3eda0  uthash-2.1.0.tar.gz"
